<?php
/**
 * Template Name: gamedaren_top50
 *
 * 
 * date:2011/10/14 
 * @author yuyue 
 * 
 */

$siteurl = get_bloginfo('template_url');
get_header();
?>
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $siteurl?>/style/style-top10.css">

<div id="gametop_center">
		<span class="gametop-head"><b>TOP</b>50游戏达人排行榜</span> 		 
		<div class="gametop-left">
			<span class="gametop-list">
            	<a href="http://www.youxisoso.com/top-flash-games">
					Flash小游戏
				</a>
            </span>
			<span class="gametop-list">
            	<a href="http://www.youxisoso.com/top-web-games" >
					网页游戏
				</a>
            </span> 
            <span class="gametop-list">
            	<a href="http://www.youxisoso.com/top-mobile-games" >
					手机游戏
				</a>
            </span> 
            <span class="gametop-list">
            	<a href="http://www.youxisoso.com/top-players" class="xz">
					游戏达人排行榜
				</a>
            </span>  
		</div>
        <div class="game-right">
        	<?php
        		//global $wpdb;
        		//$sql_site = "select * from wp_users order by user_empiricalValue desc limit 50";
        		//$sql_site = "select ID,display_name from wp_users$$$";
				$game_daren = get_users('meta_key=user_empiricalValue'); 
				$i=0;
 				$jianyan = array();
 				foreach ( $game_daren as $usermeta ){
 					$userid = $usermeta->display_name;
 					$user_jingyan=getUserEmpiricalValue($usermeta->ID);
 					$jianyan["$userid"]=$user_jingyan;
 				}
 				 
 				arsort($jianyan);
 				foreach($jianyan as $key=>$value ){
 					$i++;
 					if($i < 51){
        	?>
	        	 <div class="gametop10list">
	            	<div>
	            		<?php if($i < 11){ ?>
	                    <img src="<?php echo $siteurl ?>/images/top10/NO<?php echo $i ?>.gif"  class="No" />
	                    <?php } ?>
	                	<img src="<?php echo $siteurl ?>/images/top10/userioc.gif" />
	                </div>
	                <span>用户名：<font><?php echo $key ?></font></span> 
                	<span>经验值：<?php echo $value ?></span>
	            
	            </div> 
        	<?php }} ?>   
            <!--
            <div class="gametop10list">
            	<div>
                    <img src=" /images/top10/NO10.gif"  class="No"/>
                	<img src=" /images/top10/userioc.gif" />
                </div>
                <span>用户名：<font>用户名称啥的</font></span> 
                <span>经验值：10000</span>
                <form>
                	<input type="button" value=""  style="display:none;"/>
                </form>
            </div>-->  
        </div>			 
	</div> 
<?php get_footer();?>